Skip to content

Improve Arch Linux support and fix video export on Hyprland#484

Merged
siddharthvaddem merged 3 commits into
siddharthvaddem:mainfrom
psychosomat:main
May 3, 2026
Merged

Improve Arch Linux support and fix video export on Hyprland#484
siddharthvaddem merged 3 commits into
siddharthvaddem:mainfrom
psychosomat:main

Conversation

@psychosomat
Copy link
Copy Markdown
Contributor

@psychosomat psychosomat commented Apr 21, 2026

  • Add pacman package build target for Arch Linux in electron-builder.json5
  • Update build:linux script in package.json to include pacman target
  • Fix dialog window issues on Wayland/Hyprland:
    • Pass mainWindow reference to dialog.showSaveDialog and dialog.showOpenDialog in electron/ipc/handlers.ts
    • Required for proper dialog functionality on Wayland compositors
    • Previously dialogs opened without parent window attachment causing issues on Hyprland

Changes ensure:

  • Correct video export on Arch Linux + Hyprland systems
  • Ability to install via pacman package manager
  • Improved compatibility with Wayland compositors

Summary by CodeRabbit

  • New Features

    • Linux builds now also produce Debian (.deb) and Pacman packages in addition to AppImage
    • Improved Wayland support for better window rendering and screen capture
  • Improvements

    • File open/save dialogs are now attached to the main application window for a more consistent user experience

- Add pacman package build target for Arch Linux in electron-builder.json5
- Update build:linux script in package.json to include pacman target
- Fix dialog window issues on Wayland/Hyprland:
  * Pass mainWindow reference to dialog.showSaveDialog and dialog.showOpenDialog in electron/ipc/handlers.ts
  * Required for proper dialog functionality on Wayland compositors
  * Previously dialogs opened without parent window attachment causing issues on Hyprland

Changes ensure:
- Correct video export on Arch Linux + Hyprland systems
- Ability to install via pacman package manager
- Improved compatibility with Wayland compositors
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 02d814d1-74a4-4044-967b-b0a8c5cb8bdc

📥 Commits

Reviewing files that changed from the base of the PR and between d6d872e and b7d3563.

📒 Files selected for processing (1)
  • .github/workflows/build.yml

📝 Walkthrough

Walkthrough

Detect Wayland on Linux and add Electron command-line flags; make file dialogs attach to the main BrowserWindow when available; and add pacman (alongside AppImage and deb) to Linux packaging and CI artifact uploads.

Changes

Single change DAG

Layer / File(s) Summary
Platform flags (runtime wiring)
electron/main.ts
Detect Wayland via process.env.XDG_SESSION_TYPE === "wayland" or process.env.WAYLAND_DISPLAY and append --ozone-platform=wayland and --enable-features=WaylandWindowDrag,WebRTCPipeWireCapturer to Electron switches.
Dialog options helper & callers (UI wiring)
electron/ipc/handlers.ts
Add buildDialogOptions that attaches parent: getMainWindow() when that window exists and isn't destroyed; use it for dialog.showSaveDialog / dialog.showOpenDialog in handlers: save-exported-video, open-video-file-picker, save-project-file, load-project-file.
Packaging config / build scripts
electron-builder.json5, package.json
Include pacman in linux.target and update build:linux script to pass AppImage deb pacman to electron-builder.
CI artifacts
.github/workflows/build.yml
Upload step extended to include release/**/*.pacman artifacts alongside existing AppImage/zsync/.deb uploads.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • siddharthvaddem

Poem

wayland wakes, the flags go on — a quiet nudge at boot 🌙
dialogs now sit with parents, no more floating loot
appimage, deb, pacman — three-pack on the shelf 🎒
builds upload the lot, lowkey less cursed than before, myself ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the two main changes: Arch Linux support (pacman packages) and Wayland/Hyprland dialog fixes.
Description check ✅ Passed The description covers the key changes and motivation (Wayland compatibility, Arch support), but lacks explicit sections matching the template structure and is missing some checklist items.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 31f0483c65

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@electron/ipc/handlers.ts`:
- Around line 839-856: The dialog calls duplicate the options and pass
getMainWindow() directly which may return a stale/destroyed BrowserWindow;
create a small helper (e.g., buildDialogOptions or attachParentIfAlive) that
accepts the base options object and will attach a valid parent only when
getMainWindow() exists and !mainWindow.isDestroyed(), then use that helper for
dialog.showSaveDialog and the other dialog callers so you build the options once
(title, defaultPath, filters, properties) and only add a parent: mainWindow when
safe instead of passing getMainWindow() directly in
showSaveDialog/showOpenDialog call sites referenced here.
- Around line 362-364: The supportsWindowOpacity flag incorrectly treats Wayland
the same as non-Linux platforms; update the assignment of supportsWindowOpacity
(which currently references isWayland) to exclude Wayland so Linux always
follows the no-opacity codepath: remove the "|| isWayland" portion where
supportsWindowOpacity is computed, leaving isWayland as a separate boolean and
ensuring subsequent logic in the code that calls BrowserWindow.setOpacity(0) and
win.hide() (refer to supportsWindowOpacity, isWayland, BrowserWindow.setOpacity,
and win.hide) will run the Linux fallback path.

In `@electron/main.ts`:
- Line 41: Replace the incorrect Chromium feature name "PipeWire" used in
app.commandLine.appendSwitch("enable-features", "...") with the correct feature
"WebRTCPipeWireCapturer" so the call to app.commandLine.appendSwitch (in
electron/main.ts) enables WaylandWindowDrag and WebRTCPipeWireCapturer; update
the feature list string passed to app.commandLine.appendSwitch accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 66c50af3-1976-48d7-9764-ef5b99972944

📥 Commits

Reviewing files that changed from the base of the PR and between cccb966 and 31f0483.

📒 Files selected for processing (4)
  • electron-builder.json5
  • electron/ipc/handlers.ts
  • electron/main.ts
  • package.json

Comment thread electron/ipc/handlers.ts Outdated
Comment thread electron/ipc/handlers.ts Outdated
Comment thread electron/main.ts Outdated
- Add buildDialogOptions helper function to safely attach parent window only when valid and not destroyed
- Update all dialog calls (save-exported-video, open-video-file-picker, save-project-file, load-project-file) to use the helper
- Fix supportsWindowOpacity logic by removing || isWayland so Linux always follows no-opacity codepath
- Change incorrect Chromium feature name 'PipeWire' to 'WebRTCPipeWireCapturer' in main.ts
- Remove unused isWayland variable in handlers.ts
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
electron/main.ts (1)

33-43: wayland detection + pipewire flag — looks good 👍

pipewire feature name is now correct (WebRTCPipeWireCapturer), matching the previous round of feedback. detection via XDG_SESSION_TYPE/WAYLAND_DISPLAY is the standard heuristic.

two tiny nits, both optional:

  • process.env.WAYLAND_DISPLAY !== undefined treats an empty string as "wayland present". vanishingly rare in practice but a truthy check is slightly safer:
  • electron also supports --ozone-platform-hint=auto, which lets chromium pick wayland when available and gracefully fall back to x11 otherwise. since you're already gating on a wayland check, hard-setting wayland is fine — just flagging in case you want the softer landing for weird sessions (e.g. XWayland-only apps or broken compositors).
optional tweak
-	const isWayland =
-		process.env.XDG_SESSION_TYPE === "wayland" || process.env.WAYLAND_DISPLAY !== undefined;
+	const isWayland =
+		process.env.XDG_SESSION_TYPE === "wayland" || Boolean(process.env.WAYLAND_DISPLAY);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@electron/main.ts` around lines 33 - 43, Change the WAYLAND detection to treat
an empty string as absent by replacing the strict undefined check with a
truthiness check (e.g., use process.env.WAYLAND_DISPLAY instead of
process.env.WAYLAND_DISPLAY !== undefined) in the isWayland calculation so
isWayland is false for empty strings; optionally, if you prefer a softer
fallback instead of forcing Wayland, switch the call to
app.commandLine.appendSwitch("ozone-platform", "wayland") to use the hint form
app.commandLine.appendSwitch("ozone-platform-hint", "auto") (or use that variant
when you want Chromium to prefer Wayland but fall back to X11) while keeping the
WebRTCPipeWireCapturer feature appendSwitch unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@electron/main.ts`:
- Around line 33-43: Change the WAYLAND detection to treat an empty string as
absent by replacing the strict undefined check with a truthiness check (e.g.,
use process.env.WAYLAND_DISPLAY instead of process.env.WAYLAND_DISPLAY !==
undefined) in the isWayland calculation so isWayland is false for empty strings;
optionally, if you prefer a softer fallback instead of forcing Wayland, switch
the call to app.commandLine.appendSwitch("ozone-platform", "wayland") to use the
hint form app.commandLine.appendSwitch("ozone-platform-hint", "auto") (or use
that variant when you want Chromium to prefer Wayland but fall back to X11)
while keeping the WebRTCPipeWireCapturer feature appendSwitch unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f43e5ca0-dc0b-4710-a618-29485c3f4ea7

📥 Commits

Reviewing files that changed from the base of the PR and between 31f0483 and d6d872e.

📒 Files selected for processing (2)
  • electron/ipc/handlers.ts
  • electron/main.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • electron/ipc/handlers.ts

@psychosomat psychosomat mentioned this pull request Apr 25, 2026
1 task
@siddharthvaddem
Copy link
Copy Markdown
Owner

@psychosomat I will not be able to validate this/ test this. Waiting on someone who can help validate this before it can be merged

@psychosomat
Copy link
Copy Markdown
Contributor Author

@psychosomat I will not be able to validate this/ test this. Waiting on someone who can help validate this before it can be merged

No problem - I totally get that you already have enough of PR. Either way, I'd be happy to help.

Repository owner deleted a comment from Qodo-Free-For-OSS May 3, 2026
Repository owner deleted a comment from Qodo-Free-For-OSS May 3, 2026
@siddharthvaddem siddharthvaddem merged commit f7d1bc6 into siddharthvaddem:main May 3, 2026
13 checks passed
@utkarsh125
Copy link
Copy Markdown

Is the installation via pacman/yay working for openscreen? The AUR version is not working (openscreen-git) when I tested it on hyprland + arch

@psychosomat
Copy link
Copy Markdown
Contributor Author

@utkarsh125 The AUR package was updated quite a while ago. To resolve this, download the .pacman file from the release page and install it using the command pacman -U Openscreen-Linux-latest.pacman. This method is guaranteed work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants